*%
*% Copyright (c) 1997 - 1999 Microsoft Corporation
*% All Rights Reserved.
*%
*GPDSpecVersion: "1.0"
*GPDFileName: "HPLJ4ML.GPD"
*GPDFileVersion: "1.004"
*Include: "StdNames.gpd"
*Include: "ttfsub.gpd" 
*ModelName: "HP LaserJet 4ML"
*MasterUnits: PAIR(1200, 1200)
*ResourceDLL: "pcl5eres.dll"
*PrintRate: 4
*PrintRatePPM: 4
*PrintRateUnit: PPM
*PrinterType: PAGE
*MaxCopies: 999
*Feature: Orientation
{
    *rcNameID: =ORIENTATION_DISPLAY
    *DefaultOption: PORTRAIT
    *Option: PORTRAIT
    {
        *rcNameID: =PORTRAIT_DISPLAY
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.1
            *Cmd: "<1B>&l0O"
        }
    }
    *Option: LANDSCAPE_CC90
    {
        *rcNameID: =LANDSCAPE_DISPLAY
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.1
            *Cmd: "<1B>&l1O"
        }
    }
}
*Feature: InputBin
{
    *rcNameID: =PAPER_SOURCE_DISPLAY
    *DefaultOption: UPPER
    *Option: UPPER
    {
        *rcNameID: 637
        *Constraints: LIST(PaperSize.ENV_10,PaperSize.ENV_DL,PaperSize.ENV_C5,PaperSize.ENV_MONARCH,
+                               PaperSize.ENV_B5,PaperSize.B5,PaperSize.CUSTOMSIZE) 
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.2
            *Cmd: "<1B>&l1H"
        }
    }
    *Option: MANUAL
    {
        *rcNameID: =MANUAL_FEED_DISPLAY
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.2
            *Cmd: "<1B>&l2H"
        }
    }
}
*Feature: Resolution
{
    *rcNameID: =RESOLUTION_DISPLAY
    *DefaultOption: Option1
    *Option: Option1
    {
        *Name: "300 x 300 dots per inch"
        *DPI: PAIR(300, 300)
        *TextDPI: PAIR(300, 300)
        *MinStripBlankPixels: 32
        EXTERN_GLOBAL: *StripBlanks: LIST(ENCLOSED,TRAILING)
        *SpotDiameter: 100
        *Command: CmdBeginRaster { *Cmd : "<1B>*r1A" }
        *Command: CmdEndRaster { *Cmd : "<1B>*rB" }
        *Command: CmdSendBlockData { *Cmd : "<1B>*b" %d{NumOfDataBytes}"W" }
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.4
            *Cmd: "<1B>*t300R"
        }
    }
    *Option: Option2
    {
        *Name: "150 x 150 dots per inch"
        *DPI: PAIR(150, 150)
        *TextDPI: PAIR(300, 300)
        *MinStripBlankPixels: 32
        EXTERN_GLOBAL: *StripBlanks: LIST(ENCLOSED,TRAILING)
        *SpotDiameter: 100
        *Command: CmdBeginRaster { *Cmd : "<1B>*r1A" }
        *Command: CmdEndRaster { *Cmd : "<1B>*rB" }
        *Command: CmdSendBlockData { *Cmd : "<1B>*b" %d{NumOfDataBytes}"W" }
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.4
            *Cmd: "<1B>*t150R"
        }
    }
}
*Feature: PaperSize
{
    *rcNameID: =PAPER_SIZE_DISPLAY
    *DefaultOption: LETTER
    *Option: LETTER
    {
        *rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *PageProtectMem: 1028
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(9600, 12800)
                *PrintableOrigin: PAIR(300, 200)
                *CursorOrigin: PAIR(300, 200)
                *Command: CmdSelect
                {
                    *Order: DOC_SETUP.3
                    *Cmd: "<1B>&l2a8c1E<1B>*p0x0Y<1B>*c0t5760x7680Y"
                }
            }
            *case: LANDSCAPE_CC90
            {
                *PrintableArea: PAIR(9800, 12720)
                *PrintableOrigin: PAIR(200, 240)
                *CursorOrigin: PAIR(200, 12960)
                *Command: CmdSelect
                {
                    *Order: DOC_SETUP.3
                    *Cmd: "<1B>&l2a8c1E<1B>*p0x0Y<1B>*c0t7632x5880Y"
                }
            }
        }
    }
    *Option: LEGAL
    {
        *rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *PageProtectMem: 1692
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(9600, 16400)
                *PrintableOrigin: PAIR(300, 200)
                *CursorOrigin: PAIR(300, 200)
                *Command: CmdSelect
                {
                    *Order: DOC_SETUP.3
                    *Cmd: "<1B>&l3a8c1E<1B>*p0x0Y<1B>*c0t5760x9840Y"
                }
            }
            *case: LANDSCAPE_CC90
            {
                *PrintableArea: PAIR(9800, 16320)
                *PrintableOrigin: PAIR(200, 240)
                *CursorOrigin: PAIR(200, 16560)
                *Command: CmdSelect
                {
                    *Order: DOC_SETUP.3
                    *Cmd: "<1B>&l3a8c1E<1B>*p0x0Y<1B>*c0t9792x5880Y"
                }
            }
        }
    }
    *Option: EXECUTIVE
    {
        *rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *PageProtectMem: 1028
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(8100, 12200)
                *PrintableOrigin: PAIR(300, 200)
                *CursorOrigin: PAIR(300, 200)
                *Command: CmdSelect
                {
                    *Order: DOC_SETUP.3
                    *Cmd: "<1B>&l1a8c1E<1B>*p0x0Y<1B>*c0t4860x7320Y"
                }
            }
            *case: LANDSCAPE_CC90
            {
                *PrintableArea: PAIR(8300, 12120)
                *PrintableOrigin: PAIR(200, 240)
                *CursorOrigin: PAIR(200, 12360)
                *Command: CmdSelect
                {
                    *Order: DOC_SETUP.3
                    *Cmd: "<1B>&l1a8c1E<1B>*p0x0Y<1B>*c0t7272x4980Y"
                }
            }
        }
    }
    *Option: A4
    {
        *rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *PageProtectMem: 1063
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(9352, 13628)
                *PrintableOrigin: PAIR(284, 200)
                *CursorOrigin: PAIR(284, 200)
                *Command: CmdSelect
                {
                    *Order: DOC_SETUP.3
                    *Cmd: "<1B>&l26a8c1E<1B>*p0x0Y<1B>*c0t5611x8177Y"
                }
            }
            *case: LANDSCAPE_CC90
            {
                *PrintableArea: PAIR(9520, 13556)
                *PrintableOrigin: PAIR(200, 236)
                *CursorOrigin: PAIR(200, 13792)
                *Command: CmdSelect
                {
                    *Order: DOC_SETUP.3
                    *Cmd: "<1B>&l26a8c1E<1B>*p0x0Y<1B>*c0t8134x5712Y"
                }
            }
        }
    }
    *Option: ENV_10
    {
        *rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *PageProtectMem: 1028
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(4348, 11000)
                *PrintableOrigin: PAIR(300, 200)
                *CursorOrigin: PAIR(300, 200)
                *Command: CmdSelect
                {
                    *Order: DOC_SETUP.3
                    *Cmd: "<1B>&l81a8c1E<1B>*p0x0Y<1B>*c0t2609x6600Y"
                }
            }
            *case: LANDSCAPE_CC90
            {
                *PrintableArea: PAIR(4548, 10920)
                *PrintableOrigin: PAIR(200, 240)
                *CursorOrigin: PAIR(200, 11160)
                *Command: CmdSelect
                {
                    *Order: DOC_SETUP.3
                    *Cmd: "<1B>&l81a8c1E<1B>*p0x0Y<1B>*c0t6552x2729Y"
                }
            }
        }
    }
    *Option: ENV_DL
    {
        *rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *PageProtectMem: 1028
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(4628, 9992)
                *PrintableOrigin: PAIR(284, 200)
                *CursorOrigin: PAIR(284, 200)
                *Command: CmdSelect
                {
                    *Order: DOC_SETUP.3
                    *Cmd: "<1B>&l90a8c1E<1B>*p0x0Y<1B>*c0t2777x5995Y"
                }
            }
            *case: LANDSCAPE_CC90
            {
                *PrintableArea: PAIR(4796, 9920)
                *PrintableOrigin: PAIR(200, 236)
                *CursorOrigin: PAIR(200, 10156)
                *Command: CmdSelect
                {
                    *Order: DOC_SETUP.3
                    *Cmd: "<1B>&l90a8c1E<1B>*p0x0Y<1B>*c0t5952x2878Y"
                }
            }
        }
    }
    *Option: ENV_C5
    {
        *rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *PageProtectMem: 1028
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(7084, 10416)
                *PrintableOrigin: PAIR(284, 200)
                *CursorOrigin: PAIR(284, 200)
                *Command: CmdSelect
                {
                    *Order: DOC_SETUP.3
                    *Cmd: "<1B>&l91a8c1E<1B>*p0x0Y<1B>*c0t4250x6250Y"
                }
            }
            *case: LANDSCAPE_CC90
            {
                *PrintableArea: PAIR(7252, 10344)
                *PrintableOrigin: PAIR(200, 236)
                *CursorOrigin: PAIR(200, 10580)
                *Command: CmdSelect
                {
                    *Order: DOC_SETUP.3
                    *Cmd: "<1B>&l91a8c1E<1B>*p0x0Y<1B>*c0t6206x4351Y"
                }
            }
        }
    }
    *Option: ENV_MONARCH
    {
        *rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *PageProtectMem: 1028
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(4048, 8600)
                *PrintableOrigin: PAIR(300, 200)
                *CursorOrigin: PAIR(300, 200)
                *Command: CmdSelect
                {
                    *Order: DOC_SETUP.3
                    *Cmd: "<1B>&l80a8c1E<1B>*p0x0Y<1B>*c0t2429x5160Y"
                }
            }
            *case: LANDSCAPE_CC90
            {
                *PrintableArea: PAIR(4248, 8520)
                *PrintableOrigin: PAIR(200, 240)
                *CursorOrigin: PAIR(200, 8760)
                *Command: CmdSelect
                {
                    *Order: DOC_SETUP.3
                    *Cmd: "<1B>&l80a8c1E<1B>*p0x0Y<1B>*c0t5112x2549Y"
                }
            }
        }
    }
    *Option: ENV_B5
    {
        *rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *PageProtectMem: 1028
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(7744, 11408)
                *PrintableOrigin: PAIR(284, 200)
                *CursorOrigin: PAIR(284, 200)
                *Command: CmdSelect
                {
                    *Order: DOC_SETUP.3
                    *Cmd: "<1B>&l100a8c1E<1B>*p0x0Y<1B>*c0t4646x6845Y"
                }
            }
            *case: LANDSCAPE_CC90
            {
                *PrintableArea: PAIR(7912, 11336)
                *PrintableOrigin: PAIR(200, 236)
                *CursorOrigin: PAIR(200, 11572)
                *Command: CmdSelect
                {
                    *Order: DOC_SETUP.3
                    *Cmd: "<1B>&l100a8c1E<1B>*p0x0Y<1B>*c0t6802x4747Y"
                }
            }
        }
    }
    *Option: B5
    {
        *rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *PageProtectMem: 3198
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(8028, 11740)
                *PrintableOrigin: PAIR(284, 200)
                *CursorOrigin: PAIR(284, 200)
                *Command: CmdSelect
                {
                    *Order: DOC_SETUP.3
                    *Cmd: "<1B>&l101a8c1E<1B>*p0x0Y<1B>*c0t4818x7044Y"
                }
            }
            *case: LANDSCAPE_CC90
            {
                *PrintableArea: PAIR(8198, 11668)
                *PrintableOrigin: PAIR(200, 236)
                *CursorOrigin: PAIR(200, 16564)
                *Command: CmdSelect
                {
                    *Order: DOC_SETUP.3
                    *Cmd: "<1B>&l101a8c1E<1B>*p0x0Y<1B>*c0t7001x4919Y"
                }
            }
        }
    }
    *Option: CUSTOMSIZE
    {
        *rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *PageProtectMem: 5230
        *MinSize: PAIR(4488, 8088)
        *MaxSize: PAIR(10200, 16800)
        *MaxPrintableWidth: 10200
        *MinLeftMargin: 100
        *CenterPrintable?: TRUE

        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *CustCursorOriginX:  %d{300 }
                *CustCursorOriginY:   %d{200 }
                *CustPrintableOriginX:  %d{300 }
                *CustPrintableOriginY:  %d{200}
                *CustPrintableSizeX:   %d{ PhysPaperWidth - 600 }
                *CustPrintableSizeY:  %d{ PhysPaperLength - 400 }

                *Command: CmdSelect
                {
                    *Order: DOC_SETUP.3
                    *Cmd: "<1B>&l2h3a8c1E<1B>*p0x0Y<1B>*c0t5760x9840Y"
                }
            }
            *case: LANDSCAPE_CC90
            {
                *CustCursorOriginX:  %d{200 }
                *CustCursorOriginY:   %d{16560 }
                *CustPrintableOriginX:  %d{200 }
                *CustPrintableOriginY:  %d{240}
                *CustPrintableSizeX:   %d{ PhysPaperWidth - 400 }
                *CustPrintableSizeY:  %d{ PhysPaperLength - 480 }

                *Command: CmdSelect
                {
                    *Order: DOC_SETUP.3
                    *Cmd: "<1B>&l2h3a8c1E<1B>*p0x0Y<1B>*c0t9792x5880Y"
                }
            }
        }
    }
}
*Feature: Economode
{
    *rcNameID: 377
    *DefaultOption: Option1
    *Option: Option1
    {
        *rcNameID: 266
        *Command: CmdSelect
        {
            *Order: JOB_SETUP.5
            *Cmd: "@PJL SET ECONOMODE=OFF<0A>"
        }
    }
    *Option: Option2
    {
        *rcNameID: 267
        *Command: CmdSelect
        {
            *Order: JOB_SETUP.5
            *Cmd: "@PJL SET ECONOMODE=ON<0A>"
        }
    }
}
*Feature: RET
{
    *rcNameID: 378
    *DefaultOption: Option1
    *Option: Option1
    {
        *rcNameID: 296
        *Command: CmdSelect
        {
            *Order: JOB_SETUP.4
            *Cmd: "@PJL SET RET=MEDIUM<0A>"
        }
    }
    *Option: Option2
    {
        *rcNameID: 300
        *Command: CmdSelect
        {
            *Order: JOB_SETUP.4
            *Cmd: "@PJL SET RET=OFF<0A>"
        }
    }
}
*Feature: PrintDensity
{
    *rcNameID: =PRINTDENSITY_DISPLAY
    *DefaultOption: Option3
    *Option: Option1
    {
        *rcNameID: 340
        *Command: CmdSelect
        {
            *Order: JOB_SETUP.3
            *Cmd: "@PJL SET DENSITY=1<0A>"
        }
    }
    *Option: Option2
    {
        *rcNameID: 341
        *Command: CmdSelect
        {
            *Order: JOB_SETUP.3
            *Cmd: "@PJL SET DENSITY=2<0A>"
        }
    }
    *Option: Option3
    {
        *rcNameID: 342
        *Command: CmdSelect
        {
            *Order: JOB_SETUP.3
            *Cmd: "@PJL SET DENSITY=3<0A>"
        }
    }
    *Option: Option4
    {
        *rcNameID: 343
        *Command: CmdSelect
        {
            *Order: JOB_SETUP.3
            *Cmd: "@PJL SET DENSITY=4<0A>"
        }
    }
    *Option: Option5
    {
        *rcNameID: 344
        *Command: CmdSelect
        {
            *Order: JOB_SETUP.3
            *Cmd: "@PJL SET DENSITY=5<0A>"
        }
    }
}
*Feature: Halftone
{
    *rcNameID: =HALFTONING_DISPLAY
    *DefaultOption: HT_PATSIZE_AUTO
    *Option: HT_PATSIZE_AUTO
    {
        *rcNameID: =HT_AUTO_SELECT_DISPLAY
    }
*Ifdef: WINNT_50
    *Option: HT_PATSIZE_SUPERCELL_M
    {
        *rcNameID: =HT_SUPERCELL_DISPLAY
    }
*Endif:
    *Option: HT_PATSIZE_6x6_M
    {
        *rcNameID: =HT_DITHER6X6_DISPLAY
    }
    *Option: HT_PATSIZE_8x8_M
    {
        *rcNameID: =HT_DITHER8X8_DISPLAY
    }
}
*Feature: Memory
{
    *rcNameID: =PRINTER_MEMORY_DISPLAY
    *DefaultOption: 4096KB
    *Option: 4096KB
    {
        *Name: "4MB"
        *MemoryConfigKB: PAIR(4096, 3150)
    }
}
*Feature: PageProtect
{
    *rcNameID: =PAGE_PROTECTION_DISPLAY
    *DefaultOption: OFF
    *Option: ON
    {
        *rcNameID: =ON_DISPLAY
        *Command: CmdSelect
        {
            *Order: JOB_SETUP.2
            *Cmd: "@PJL SET PAGEPROTECT=ON<0A>"
        }
    }
    *Option: OFF
    {
        *rcNameID: =OFF_DISPLAY
        *Command: CmdSelect
        {
            *Order: JOB_SETUP.2
            *Cmd: "@PJL SET PAGEPROTECT=OFF<0A>@PJL SET PAGEPROTECT=AUTO<0A>"
        }
    }
}
*%-------------------------------------------------------------------------
*% Job setup commands
*%-------------------------------------------------------------------------
*Command: CmdStartJob
{
    *Order: JOB_SETUP.1
    *Cmd: "<1B>%%-12345X"
+         "@PJL COMMENT HP LaserJet 4ML<0A>"
}
*Command: CmdStartDoc
{
    *Order: JOB_SETUP.6
    *Cmd: "@PJL ENTER LANGUAGE=PCL<0D0A1B>E<1B>*r0F"
}
*Command: CmdStartPage
{
    *Order: PAGE_SETUP.1
    *Cmd: "<1B>*b0M<0D>"
}
*Command: CmdEndJob
{
    *Order: JOB_FINISH.1
    *Cmd: "<1B>E<1B>%%-12345X"
}
*Command: CmdCopies
{
    *Order: DOC_SETUP.5
    *Cmd: "<1B>&l" %d[1,999]{NumOfCopies}"X"
}
*RotateCoordinate?: TRUE
*RotateRaster?: TRUE
*RotateFont?: TRUE
*TextCaps: LIST(TC_CR_90,TC_UA_ABLE)
*MemoryUsage: LIST(FONT)
*CursorXAfterCR: AT_PRINTABLE_X_ORIGIN
*BadCursorMoveInGrxMode: LIST(X_PORTRAIT,Y_LANDSCAPE)
*XMoveThreshold: 0
*YMoveThreshold: 0
*XMoveUnit: 300
*YMoveUnit: 300
*Command: CmdXMoveAbsolute { *Cmd : "<1B>*p" %d{(DestX / 4) }"X" }
*Command: CmdXMoveRelRight { *Cmd : "<1B>*p+" %d[0,9600]{max_repeat((DestXRel / 4) )}"X" }
*Command: CmdXMoveRelLeft { *Cmd : "<1B>*p-" %d[0,9600]{max_repeat((DestXRel / 4) )}"X" }
*Command: CmdYMoveAbsolute { *Cmd : "<1B>*p" %d{(DestY / 4) }"Y" }
*Command: CmdYMoveRelDown { *Cmd : "<1B>*p+" %d[1,12600]{max_repeat((DestYRel / 4) )}"Y" }
*Command: CmdYMoveRelUp { *Cmd : "<1B>*p-" %d[1,12600]{max_repeat((DestYRel / 4) )}"Y" }
*Command: CmdCR { *Cmd : "<0D>" }
*Command: CmdLF { *Cmd : "<0A>" }
*Command: CmdFF { *Cmd : "<0C>" }
*Command: CmdBackSpace { *Cmd : "<08>" }
*Command: CmdUniDirectionOn { *Cmd : "<00>" }
*Command: CmdUniDirectionOff { *Cmd : "<00>" }
*Command: CmdPushCursor { *Cmd : "<1B>&f0S" }
*Command: CmdPopCursor { *Cmd : "<1B>&f1S" }
*Command: CmdSetSimpleRotation { *Cmd : "<1B>&a" %d{PrintDirInCCDegrees}"P" }
*EjectPageWithFF?: TRUE
*Command: CmdEnableTIFF4 { *Cmd : "<1B>*b2M" }
*Command: CmdDisableCompression { *Cmd : "<1B>*b0M" }
*Command: CmdEnableDRC { *Cmd : "<1B>*b3M" }
*OutputDataFormat: H_BYTE
*OptimizeLeftBound?: TRUE
*CursorXAfterSendBlockData: AT_GRXDATA_ORIGIN
*CursorYAfterSendBlockData: AUTO_INCREMENT
*DefaultFont: 136
*DefaultCTT: 0
*CharPosition: BASELINE
*TTFSEnabled?: TRUE
*DeviceFonts: LIST(136,146,147,148,149,150,151,152,153,154,155,156,157,164,165,166,
+                      209,210,212,213,214,215,216,217,218,219,230)
*MinFontID: 16534
*MaxFontID: 32768
*FontFormat: HPPCL
*Command: CmdSetFontID { *Cmd : "<1B>*c" %d{NextFontID}"D" }
*Command: CmdSelectFontID { *Cmd : "<1B>(" %d{CurrentFontID}"X" }
*Command: CmdSetCharCode { *Cmd : "<1B>*c" %d{NextGlyph}"E" }
*Command: CmdUnderlineOn { *Cmd : "<1B>&dD" }
*Command: CmdUnderlineOff { *Cmd : "<1B>&d@" }
*Command: CmdWhiteTextOn { *Cmd : "<1B>*v1o1T" }
*Command: CmdWhiteTextOff { *Cmd : "<1B>*v0o0T" }
*MinGrayFill: 1
*MaxGrayFill: 100
*Command: CmdSetRectWidth { *Cmd : "<1B>*c" %d{(RectXSize / 4) }"A" }
*Command: CmdSetRectHeight { *Cmd : "<1B>*c" %d{(RectYSize / 4) }"B" }
*Command: CmdRectGrayFill { *Cmd : "<1B>*c" %d{GrayPercentage }"g2P" }
*Command: CmdRectWhiteFill { *Cmd : "<1B>*c1P" }
*Command: CmdRectBlackFill { *Cmd : "<1B>*c0P" }
